package com.rms.service.impl;

import com.rms.entity.Dish;
import com.rms.mapper.DishMapper;
import com.rms.service.DishService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 胡满意
 * @date 2019/10/31
 */
@Service
public class DishServiceImpl implements DishService {
    @Autowired
    private DishMapper dishMapper;

    @Override
    public List<Dish> selectAll(){
        return dishMapper.selectAll();
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public int cuisineDelete(int dishCuisine){
        return dishMapper.cuisineDelete(dishCuisine);
    }
}
